package com.example.homework.db.repositories

import com.example.homework.db.apis.RetrofitService
import com.example.homework.db.models.Charact
import kotlinx.coroutines.delay

class CharactRepository {
    suspend fun getAll(page: Int): List<Charact> {
        delay(1000)
        return RetrofitService.charactersApi.getAll(page).result
    }

    suspend fun getOne(id: Int): Charact {
        return RetrofitService.charactersApi.getOne(id)
    }
}